using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableOrders
	{
		public const string Table = "Orders";
		public const string OrdersID = "OrdersID";
		public const string MembersID = "MembersID";
		public const string MemberName = "MemberName";
		public const string Contact = "Contact";
		public const string TelePhone = "TelePhone";
		public const string Mobile = "Mobile";
		public const string OrderStatusID = "OrderStatusID";
		public const string OrderTypeID = "OrderTypeID";
		public const string OrdersNo = "OrdersNo";
		public const string OrderDate = "OrderDate";
		public const string Description = "Description";
		public const string TotalAmount = "TotalAmount";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
		public const string TradeNo = "TradeNo";
		public const string PayInfo = "PayInfo";
		public const string MemberNo = "MemberNo";
		public const string PreOrderStatusID = "PreOrderStatusID";
		public const string ProvinceID = "ProvinceID";
		public const string ProvinceName = "ProvinceName";
		public const string CityID = "CityID";
		public const string CityName = "CityName";
		public const string RegionID = "RegionID";
		public const string RegionName = "RegionName";
		public const string ZipCode = "ZipCode";
		public const string Address = "Address";
		public const string Consignee = "Consignee";
		public const string PayMethod = "PayMethod";
		public const string PayDate = "PayDate";
		public const string Remarks = "Remarks";
		public const string ShippingCharge = "ShippingCharge";
		public const string OdShippingMethodID = "OdShippingMethodID";
		public const string OdShippingMethod = "OdShippingMethod";
		public const string LoginName = "LoginName";
		public const string Tax = "Tax";
		public const string PayCode = "PayCode";
		public const string PayMethodCode = "PayMethodCode";
		public const string ShippingStatusID = "ShippingStatusID";
		public const string ShippingStatusName = "ShippingStatusName";
		public const string SubTotal = "SubTotal";
	}
	
	[Serializable]
	public class BaseOrders
		: IDbSessionEntity, IJsonClass
	{
		int m_OrdersID;
		/// <summary>
        /// 订单表ID
        /// </summary>
        public int OrdersID
        {
            get { return m_OrdersID; }
            set { m_OrdersID = value; }
        }
		
		int m_MembersID;
		/// <summary>
        /// 会员表ID
        /// </summary>
        public int MembersID
        {
            get { return m_MembersID; }
            set { m_MembersID = value; }
        }
		
		string m_MemberName;
		/// <summary>
        /// 会员名称
        /// </summary>
        public string MemberName
        {
            get { return m_MemberName; }
            set { m_MemberName = value; }
        }
		
		string m_Contact;
		/// <summary>
        /// 联系人
        /// </summary>
        public string Contact
        {
            get { return m_Contact; }
            set { m_Contact = value; }
        }
		
		string m_TelePhone;
		/// <summary>
        /// 联系电话
        /// </summary>
        public string TelePhone
        {
            get { return m_TelePhone; }
            set { m_TelePhone = value; }
        }
		
		string m_Mobile;
		/// <summary>
        /// 手机或其他
        /// </summary>
        public string Mobile
        {
            get { return m_Mobile; }
            set { m_Mobile = value; }
        }
		
		int? m_OrderStatusID;
		/// <summary>
        /// 订单状态表ID
        /// </summary>
        public int? OrderStatusID
        {
            get { return m_OrderStatusID; }
            set { m_OrderStatusID = value; }
        }
		
		int? m_OrderTypeID;
		/// <summary>
        /// 订单类型表ID
        /// </summary>
        public int? OrderTypeID
        {
            get { return m_OrderTypeID; }
            set { m_OrderTypeID = value; }
        }
		
		string m_OrdersNo;
		/// <summary>
        /// 订单编号
        /// </summary>
        public string OrdersNo
        {
            get { return m_OrdersNo; }
            set { m_OrdersNo = value; }
        }
		
		DateTime m_OrderDate;
		/// <summary>
        /// 订单时间
        /// </summary>
        public DateTime OrderDate
        {
            get { return m_OrderDate; }
            set { m_OrderDate = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 景点描述
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		double m_TotalAmount;
		/// <summary>
        /// 总金额
        /// </summary>
        public double TotalAmount
        {
            get { return m_TotalAmount; }
            set { m_TotalAmount = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 创建人ID
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 创建人名称
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 修改人
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 修改人ID
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		string m_TradeNo;
		/// <summary>
        /// 支付成功交易编号
        /// </summary>
        public string TradeNo
        {
            get { return m_TradeNo; }
            set { m_TradeNo = value; }
        }
		
		string m_PayInfo;
		/// <summary>
        /// 交易返回信息
        /// </summary>
        public string PayInfo
        {
            get { return m_PayInfo; }
            set { m_PayInfo = value; }
        }
		
		string m_MemberNo;
		/// <summary>
        /// 会员编号
        /// </summary>
        public string MemberNo
        {
            get { return m_MemberNo; }
            set { m_MemberNo = value; }
        }
		
		int m_PreOrderStatusID;
		/// <summary>
        /// 前一状态（用于申请退订的时候，保存当然状态）
        /// </summary>
        public int PreOrderStatusID
        {
            get { return m_PreOrderStatusID; }
            set { m_PreOrderStatusID = value; }
        }
		
		int m_ProvinceID;
		/// <summary>
        /// 
        /// </summary>
        public int ProvinceID
        {
            get { return m_ProvinceID; }
            set { m_ProvinceID = value; }
        }
		
		string m_ProvinceName;
		/// <summary>
        /// 
        /// </summary>
        public string ProvinceName
        {
            get { return m_ProvinceName; }
            set { m_ProvinceName = value; }
        }
		
		int m_CityID;
		/// <summary>
        /// 
        /// </summary>
        public int CityID
        {
            get { return m_CityID; }
            set { m_CityID = value; }
        }
		
		string m_CityName;
		/// <summary>
        /// 
        /// </summary>
        public string CityName
        {
            get { return m_CityName; }
            set { m_CityName = value; }
        }
		
		int m_RegionID;
		/// <summary>
        /// 
        /// </summary>
        public int RegionID
        {
            get { return m_RegionID; }
            set { m_RegionID = value; }
        }
		
		string m_RegionName;
		/// <summary>
        /// 
        /// </summary>
        public string RegionName
        {
            get { return m_RegionName; }
            set { m_RegionName = value; }
        }
		
		string m_ZipCode;
		/// <summary>
        /// 
        /// </summary>
        public string ZipCode
        {
            get { return m_ZipCode; }
            set { m_ZipCode = value; }
        }
		
		string m_Address;
		/// <summary>
        /// 
        /// </summary>
        public string Address
        {
            get { return m_Address; }
            set { m_Address = value; }
        }
		
		string m_Consignee;
		/// <summary>
        /// 
        /// </summary>
        public string Consignee
        {
            get { return m_Consignee; }
            set { m_Consignee = value; }
        }
		
		string m_PayMethod;
		/// <summary>
        /// 
        /// </summary>
        public string PayMethod
        {
            get { return m_PayMethod; }
            set { m_PayMethod = value; }
        }
		
		DateTime? m_PayDate;
		/// <summary>
        /// 
        /// </summary>
        public DateTime? PayDate
        {
            get { return m_PayDate; }
            set { m_PayDate = value; }
        }
		
		string m_Remarks;
		/// <summary>
        /// 
        /// </summary>
        public string Remarks
        {
            get { return m_Remarks; }
            set { m_Remarks = value; }
        }
		
		double m_ShippingCharge;
		/// <summary>
        /// 
        /// </summary>
        public double ShippingCharge
        {
            get { return m_ShippingCharge; }
            set { m_ShippingCharge = value; }
        }
		
		int? m_OdShippingMethodID;
		/// <summary>
        /// 
        /// </summary>
        public int? OdShippingMethodID
        {
            get { return m_OdShippingMethodID; }
            set { m_OdShippingMethodID = value; }
        }
		
		string m_OdShippingMethod;
		/// <summary>
        /// 
        /// </summary>
        public string OdShippingMethod
        {
            get { return m_OdShippingMethod; }
            set { m_OdShippingMethod = value; }
        }
		
		string m_LoginName;
		/// <summary>
        /// 
        /// </summary>
        public string LoginName
        {
            get { return m_LoginName; }
            set { m_LoginName = value; }
        }
		
		double m_Tax;
		/// <summary>
        /// 
        /// </summary>
        public double Tax
        {
            get { return m_Tax; }
            set { m_Tax = value; }
        }
		
		string m_PayCode;
		/// <summary>
        /// 
        /// </summary>
        public string PayCode
        {
            get { return m_PayCode; }
            set { m_PayCode = value; }
        }
		
		string m_PayMethodCode;
		/// <summary>
        /// 
        /// </summary>
        public string PayMethodCode
        {
            get { return m_PayMethodCode; }
            set { m_PayMethodCode = value; }
        }
		
		int m_ShippingStatusID;
		/// <summary>
        /// 
        /// </summary>
        public int ShippingStatusID
        {
            get { return m_ShippingStatusID; }
            set { m_ShippingStatusID = value; }
        }
		
		string m_ShippingStatusName;
		/// <summary>
        /// 
        /// </summary>
        public string ShippingStatusName
        {
            get { return m_ShippingStatusName; }
            set { m_ShippingStatusName = value; }
        }
		
		double m_SubTotal;
		/// <summary>
        /// 
        /// </summary>
        public double SubTotal
        {
            get { return m_SubTotal; }
            set { m_SubTotal = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_OrdersID = reader[TableOrders.OrdersID];
            m_MembersID = reader[TableOrders.MembersID];
            m_MemberName = reader[TableOrders.MemberName];
            m_Contact = reader[TableOrders.Contact];
            m_TelePhone = reader[TableOrders.TelePhone];
            m_Mobile = reader[TableOrders.Mobile];
            m_OrderStatusID = reader[TableOrders.OrderStatusID];
            m_OrderTypeID = reader[TableOrders.OrderTypeID];
            m_OrdersNo = reader[TableOrders.OrdersNo];
            m_OrderDate = reader[TableOrders.OrderDate];
            m_Description = reader[TableOrders.Description];
            m_TotalAmount = reader[TableOrders.TotalAmount];
            m_Creater = reader[TableOrders.Creater];
            m_CreatedBy = reader[TableOrders.CreatedBy];
            m_Created = reader[TableOrders.Created];
            m_Modified = reader[TableOrders.Modified];
            m_ModifiedBy = reader[TableOrders.ModifiedBy];
            m_ModifiedByID = reader[TableOrders.ModifiedByID];
            m_TradeNo = reader[TableOrders.TradeNo];
            m_PayInfo = reader[TableOrders.PayInfo];
            m_MemberNo = reader[TableOrders.MemberNo];
            m_PreOrderStatusID = reader[TableOrders.PreOrderStatusID];
            m_ProvinceID = reader[TableOrders.ProvinceID];
            m_ProvinceName = reader[TableOrders.ProvinceName];
            m_CityID = reader[TableOrders.CityID];
            m_CityName = reader[TableOrders.CityName];
            m_RegionID = reader[TableOrders.RegionID];
            m_RegionName = reader[TableOrders.RegionName];
            m_ZipCode = reader[TableOrders.ZipCode];
            m_Address = reader[TableOrders.Address];
            m_Consignee = reader[TableOrders.Consignee];
            m_PayMethod = reader[TableOrders.PayMethod];
            m_PayDate = reader[TableOrders.PayDate];
            m_Remarks = reader[TableOrders.Remarks];
            m_ShippingCharge = reader[TableOrders.ShippingCharge];
            m_OdShippingMethodID = reader[TableOrders.OdShippingMethodID];
            m_OdShippingMethod = reader[TableOrders.OdShippingMethod];
            m_LoginName = reader[TableOrders.LoginName];
            m_Tax = reader[TableOrders.Tax];
            m_PayCode = reader[TableOrders.PayCode];
            m_PayMethodCode = reader[TableOrders.PayMethodCode];
            m_ShippingStatusID = reader[TableOrders.ShippingStatusID];
            m_ShippingStatusName = reader[TableOrders.ShippingStatusName];
            m_SubTotal = reader[TableOrders.SubTotal];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableOrders.OrdersID, PrimaryKeyType.Identity, OrdersID);
			writer[TableOrders.MembersID] = MembersID;
			writer[TableOrders.MemberName] = MemberName;
			writer[TableOrders.Contact] = Contact;
			writer[TableOrders.TelePhone] = TelePhone;
			writer[TableOrders.Mobile] = Mobile;
			writer[TableOrders.OrderStatusID] = OrderStatusID;
			writer[TableOrders.OrderTypeID] = OrderTypeID;
			writer[TableOrders.OrdersNo] = OrdersNo;
			writer[TableOrders.OrderDate] = OrderDate;
			writer[TableOrders.Description] = Description;
			writer[TableOrders.TotalAmount] = TotalAmount;
			writer[TableOrders.Creater] = Creater;
			writer[TableOrders.CreatedBy] = CreatedBy;
			writer[TableOrders.Created] = Created;
			writer[TableOrders.Modified] = Modified;
			writer[TableOrders.ModifiedBy] = ModifiedBy;
			writer[TableOrders.ModifiedByID] = ModifiedByID;
			writer[TableOrders.TradeNo] = TradeNo;
			writer[TableOrders.PayInfo] = PayInfo;
			writer[TableOrders.MemberNo] = MemberNo;
			writer[TableOrders.PreOrderStatusID] = PreOrderStatusID;
			writer[TableOrders.ProvinceID] = ProvinceID;
			writer[TableOrders.ProvinceName] = ProvinceName;
			writer[TableOrders.CityID] = CityID;
			writer[TableOrders.CityName] = CityName;
			writer[TableOrders.RegionID] = RegionID;
			writer[TableOrders.RegionName] = RegionName;
			writer[TableOrders.ZipCode] = ZipCode;
			writer[TableOrders.Address] = Address;
			writer[TableOrders.Consignee] = Consignee;
			writer[TableOrders.PayMethod] = PayMethod;
			writer[TableOrders.PayDate] = PayDate;
			writer[TableOrders.Remarks] = Remarks;
			writer[TableOrders.ShippingCharge] = ShippingCharge;
			writer[TableOrders.OdShippingMethodID] = OdShippingMethodID;
			writer[TableOrders.OdShippingMethod] = OdShippingMethod;
			writer[TableOrders.LoginName] = LoginName;
			writer[TableOrders.Tax] = Tax;
			writer[TableOrders.PayCode] = PayCode;
			writer[TableOrders.PayMethodCode] = PayMethodCode;
			writer[TableOrders.ShippingStatusID] = ShippingStatusID;
			writer[TableOrders.ShippingStatusName] = ShippingStatusName;
			writer[TableOrders.SubTotal] = SubTotal;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_OrdersID = idd;
        }
		
		public string TableName
        {
            get { return TableOrders.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_OrdersID = hashToRead["OrdersID"];
			 
             m_MembersID = hashToRead["MembersID"];
			 
             m_MemberName = hashToRead["MemberName"];
			 
             m_Contact = hashToRead["Contact"];
			 
             m_TelePhone = hashToRead["TelePhone"];
			 
             m_Mobile = hashToRead["Mobile"];
			 
             m_OrderStatusID = hashToRead["OrderStatusID"];
			 
             m_OrderTypeID = hashToRead["OrderTypeID"];
			 
             m_OrdersNo = hashToRead["OrdersNo"];
			 
             m_OrderDate = hashToRead["OrderDate"];
			 
             m_Description = hashToRead["Description"];
			 
             m_TotalAmount = hashToRead["TotalAmount"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
             m_TradeNo = hashToRead["TradeNo"];
			 
             m_PayInfo = hashToRead["PayInfo"];
			 
             m_MemberNo = hashToRead["MemberNo"];
			 
             m_PreOrderStatusID = hashToRead["PreOrderStatusID"];
			 
             m_ProvinceID = hashToRead["ProvinceID"];
			 
             m_ProvinceName = hashToRead["ProvinceName"];
			 
             m_CityID = hashToRead["CityID"];
			 
             m_CityName = hashToRead["CityName"];
			 
             m_RegionID = hashToRead["RegionID"];
			 
             m_RegionName = hashToRead["RegionName"];
			 
             m_ZipCode = hashToRead["ZipCode"];
			 
             m_Address = hashToRead["Address"];
			 
             m_Consignee = hashToRead["Consignee"];
			 
             m_PayMethod = hashToRead["PayMethod"];
			 
             m_PayDate = hashToRead["PayDate"];
			 
             m_Remarks = hashToRead["Remarks"];
			 
             m_ShippingCharge = hashToRead["ShippingCharge"];
			 
             m_OdShippingMethodID = hashToRead["OdShippingMethodID"];
			 
             m_OdShippingMethod = hashToRead["OdShippingMethod"];
			 
             m_LoginName = hashToRead["LoginName"];
			 
             m_Tax = hashToRead["Tax"];
			 
             m_PayCode = hashToRead["PayCode"];
			 
             m_PayMethodCode = hashToRead["PayMethodCode"];
			 
             m_ShippingStatusID = hashToRead["ShippingStatusID"];
			 
             m_ShippingStatusName = hashToRead["ShippingStatusName"];
			 
             m_SubTotal = hashToRead["SubTotal"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["OrdersID"] = OrdersID;
			 
            hashToFill["MembersID"] = MembersID;
			 
            hashToFill["MemberName"] = MemberName;
			 
            hashToFill["Contact"] = Contact;
			 
            hashToFill["TelePhone"] = TelePhone;
			 
            hashToFill["Mobile"] = Mobile;
			 
            hashToFill["OrderStatusID"] = OrderStatusID;
			 
            hashToFill["OrderTypeID"] = OrderTypeID;
			 
            hashToFill["OrdersNo"] = OrdersNo;
			 
            hashToFill["OrderDate"] = OrderDate;
			 
            hashToFill["Description"] = Description;
			 
            hashToFill["TotalAmount"] = TotalAmount;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
            hashToFill["TradeNo"] = TradeNo;
			 
            hashToFill["PayInfo"] = PayInfo;
			 
            hashToFill["MemberNo"] = MemberNo;
			 
            hashToFill["PreOrderStatusID"] = PreOrderStatusID;
			 
            hashToFill["ProvinceID"] = ProvinceID;
			 
            hashToFill["ProvinceName"] = ProvinceName;
			 
            hashToFill["CityID"] = CityID;
			 
            hashToFill["CityName"] = CityName;
			 
            hashToFill["RegionID"] = RegionID;
			 
            hashToFill["RegionName"] = RegionName;
			 
            hashToFill["ZipCode"] = ZipCode;
			 
            hashToFill["Address"] = Address;
			 
            hashToFill["Consignee"] = Consignee;
			 
            hashToFill["PayMethod"] = PayMethod;
			 
            hashToFill["PayDate"] = PayDate;
			 
            hashToFill["Remarks"] = Remarks;
			 
            hashToFill["ShippingCharge"] = ShippingCharge;
			 
            hashToFill["OdShippingMethodID"] = OdShippingMethodID;
			 
            hashToFill["OdShippingMethod"] = OdShippingMethod;
			 
            hashToFill["LoginName"] = LoginName;
			 
            hashToFill["Tax"] = Tax;
			 
            hashToFill["PayCode"] = PayCode;
			 
            hashToFill["PayMethodCode"] = PayMethodCode;
			 
            hashToFill["ShippingStatusID"] = ShippingStatusID;
			 
            hashToFill["ShippingStatusName"] = ShippingStatusName;
			 
            hashToFill["SubTotal"] = SubTotal;
			 
        }

        #endregion
		
	}
}
